<?php

/**
 * 
 * manages the content-elements
 * @author Evan
 *
 */
class ElementManager
{
	private static $instance = NULL;
	private $elements = NULL;
	
	private function __construct()
	{
		
	}
	
	public static function getInstance()
	{
		if (self::instance == NULL)
		{
			self::$instance = new self;
		}
		return self::$instance;
	}
	
	public function getElementById($id)
	{
		if (is_array($this->elements))
		{
			//DO SOMETHING
		}
		else
		{
			//DO SOMETHING ELSE
		}
	}	
	
	public function getElementsForContentId($contentId)
	{
		if (is_array($this->elements))
		{
			//DO SOMETHING
		}
		else
		{
			//DO SOMETHING ELSE
		}
	}
	
	public function saveElement($element)
	{
		if ($element instanceof Element)
		{
			//DO SOMETHING
		}
		else
		{
			throw new InvalidArgumentException("Argument has to be an instance of Element."); 
		}
	}
	
}

?>